<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>My JSP 'list-news.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">

		<link rel="stylesheet" href="/housNet/css/bace.css" type="text/css"></link>
		<link rel="stylesheet" href="/housNet/css/layer.css" type="text/css"></link>

		<link rel="stylesheet" href="/housNet/css/index_news.css" type="text/css"></link>
	</head>

	<body>
	<s:set name="ntList" value="#attr.ntList"></s:set>
		<div class="main_contaner" xstyle="position:relative">
			<s:include value="../headMD.jsp" />
			<!--nav list-->
			<div class="zhixun_nav">
				<a href="/news/list-news.aspx?sid=16" target="_blank">行业动态</a> |
				<a href="/news/list-news.aspx?sid=9" target="_blank">本地楼市</a> |
				<a href="/news/list-news.aspx?sid=134" target="_blank">地产研究</a> |
				<a href="/news/topic.aspx?sid=9" target="_blank">热点专题</a> |
				<a href="/news/list-news.aspx?cid=3" target="_blank">政策法规</a> |
				<a href="/news/list-news.aspx?sid=17" target="_blank">行家论市</a> |
				<a href="/news/list-news.aspx?sid=133" target="_blank">交易指南</a> |
				<a href="/news/list-news.aspx?sid=135" target="_blank">娱乐地产</a> |
				<a href="/fitment/">家装资讯</a> |
				<a href="/association/">行业管理</a> |
				<a href="http://www.0579bbs.net/showforum-362.html" target="_blank">看房日记</a>&nbsp;
			</div>
			<div class="blank5"></div>
			<!--nav list end-->
			<div class="mainbox">
				<div class="zxun_nav1">
					<form name="search1" id="search1" method="post"
						action="list-news.aspx" style="margin: 0px;">
						<span>
							<strong>资讯搜索： </strong>
							<select class="sel" name="sid">
									<s:iterator value="#ntList" id="nt">
									<option value="${nt.id }">${nt.NName }</option>
									</s:iterator>
							</select> 
							<input type="text" size="40" name="keyword" />&nbsp;
							<button type="submit" class="red_bu1">搜 索</button> 
						</span>
					</form>
					&nbsp;&nbsp;&nbsp;
					<a href="/housNet">首页</a> >
					<a href="/housNet/news/">资讯中心</a> >
					<a href="/news/list-news.aspx?cid=1">房产动态</a> >
					<a href="/news/list-news.aspx?sid=133">交易指南</a>
				</div>
			</div>
			<div class="blank5"></div>
			<div class="mainbox">
				<!--left -->
				<div class="w678 b_FEBBBB left">
					<!--artical start-->
					<div id="datalist">
					<s:iterator value="#attr.newsList" id="nlist" status="st">
						<li>
							<a href="/housNet/news/detail_news.jsp?index=${st.index }" target="_blank" style="color: ;">${nlist.NTitle }</a><span><s:date format="yy年MM月dd日" name="#nlist.NTime"/></span>
						</li>
						<s:if test="#st.count in {4,8,12,16,20,24,28}">
							<li style="background: none;"></li>
						</s:if>
					</s:iterator>
						
						<div class="blank0"></div>
						<!--artical start-->
					</div>
					<div style="margin-right: 10px;">
						<!--turnpagestart-->
						<div class="pages">
							<div class="tatal">
								<span style='color: blue;'>1</span>/
								<span style='color: green;'>3</span>页
								<span style='color: #666666;'>|</span>共
								<span style='color: red;'>117</span>条记录
							</div>
							<script type="text/javascript"> 
function movePreview(page)
{
document.getElementById('tdPagesUp').innerHTML = getPages(page - 5,tPages);
}
 
function moveBack(page)
{
document.getElementById('tdPagesUp').innerHTML = getPages(page + 5,tPages);
}
 
function showPage(i)
{
openPage(i);
tPage = i;
document.getElementById('tdPagesUp').innerHTML = getPages(tPage,tPages);
}
 
function getPages(page,pages)
{
if (pages == 0) pages = 1;
page = (page < 1) ? 1 : page;
page = (page > pages) ? pages : page;
returnValue = '<a href="javascript:movePreview(' + 1 + ');" title="第一页" class="first">|&lt;</a><a href="javascript:movePreview(' + page + ');" title="前 5 页" class="prev">&lt;</a>';
begin = (page < 4) ? 1 : page - 2;
if (pages - begin < 4) begin = pages - 4;
if (begin < 1) begin = 1;
for (i = begin; i < begin + 5 && i <= pages; i++)
    {
    if (i == tPage)
        returnValue += '<strong>' + i + '</strong>';
    else
        returnValue += '<a href="javascript:showPage(' + i + ');">' + i + '</a>';
    }
returnValue += '<a href="javascript:moveBack(' + page + ');" title="后 5 页" class="next">&gt;</a><a href="javascript:moveBack(' + pages + ');" title="最后一页" class="last">&gt;|</a>';
return returnValue;
}
 
function openPage(ipage)
{
window.location.href='?page='+ ipage +'&sid=133&cid=1';
}
</script>
							<div id="tdPagesUp">
								<script type="text/javascript"> 
tPage = 1;
tPages = 3;
document.write(getPages(tPage,tPages));
</script>
							</div>
							<div>
								<kbd>
									转:
									<input type="text" name="page" id="page" size="3"
										maxLength="10" value="1" onchange="openPage(this.value)">
									页
									<input type='button' value='Go'>
								</kbd>
							</div>
						</div>
						<!--turnpageend-->
					</div>
					<div class="blank5"></div>
				</div>
				<!--left end-->
				<!--right -->
				<div class="rightside">
					<div class="w288 b_FEBBBB">
						<div class="zxun_rightside_title">
							<strong>本类信息分类导航</strong>
						</div>
						<ul class="zxun_right_li">
						<s:iterator value="#ntList" id="nt">
							<li>
								<a href="#">${nt.NName }</a>
							</li>
						</s:iterator>
						</ul>
						<div
							style="clear: both; border-bottom: 1px dotted #CCC; padding: 4px; background: #EEE; color: #990000; font-size: 14px; font-weight: bold;">
							>|专题：
						</div>
						<ul class="zxun_right_li">
							<li>
								<a href="?cid=1&tid=0">全部</a>
							</li>
							<li>
								<a href="?cid=1&tid=50">金华2007房交会</a>
							</li>
							<li>
								<a href="?cid=1&tid=51">兰溪2008房交会</a>
							</li>
							<li>
								<a href="?cid=1&tid=52">金华2008网络房交会</a>
							</li>
							<li>
								<a href="?cid=1&tid=53">看房直通车</a>
							</li>
							<li>
								<a href="?cid=1&tid=54">兰溪第七届房交会</a>
							</li>
							<li>
								<a href="?cid=1&tid=55">金华2008房交会</a>
							</li>
							<li>
								<a href="?cid=1&tid=149">金华2009网络房交会</a>
							</li>
							<li>
								<a href="?cid=1&tid=161">金华2009房交会</a>
							</li>
							<li>
								<a href="?cid=1&tid=170">金华2010网络房交会</a>
							</li>
							<li>
								<a href="?cid=1&tid=172">金华2010房交会</a>
							</li>
						</ul>
						<div class="blank0"></div>
					</div>
					<div class="blank5"></div>
					<a href="http://www.0579fw.com/common/advclick.aspx?id=341"
						target="_blank"><img src="http://localhost:8080/housNet/images/jxfy.gif" alt=""
							width="290" height="220" />
					</a>
					<div class="blank5"></div>
					<div class="w288 b_FEBBBB">
						<div class="zxun_rightside_title">
							<strong>最新推荐</strong>
						</div>
						<ul class="zxun_right_auto">
						</ul>
					</div>
					<div class="blank5"></div>
					<a href="http://www.0579togo.com/" target="_blank"><img
							src="http://localhost:8080/housNet/images/bcl.gif" alt="" width="290"
							height="80" />
					</a>
					<div class="blank5"></div>
					<div class="w288 b_FEBBBB">
						<div class="zxun_rightside_title">
							<a href="http://www.0579bbs.net/" title="更多" target="_blank">更多</a><strong>网友热贴</strong>
						</div>
						<ul class="zxun_right_auto">
							<script type="text/javascript" src="http://192.168.10.111:8099/dz/upload/api.php?mod=js&bid=72"></script>
						</ul>
					</div>

				</div>
				<!--right end -->
			</div>
			<div class="blank0"></div>
			<s:include value="../foodMD.jsp" />
			<div class="blank8"></div>
			<div class="blank8"></div>
			<div class="blank8"></div>
			<div class="blank8"></div>
		</div>

	</body>
</html>
